<?php $this->load->view('admin/common/pageHead');?>
<?php $this->load->view('admin/common/pageHeader');?>
<div class="clr">
	<div>
		<div class="fLeft">
			<?php $this->load->view('admin/common/left_nav'); ?>
		</div>
		<div class="fRight" style="margin-top: 20px";>

			<table valign="top" cellpadding="0" cellspacing="0" class="allbdr"
				border="0" width="650px">

				<tr bgcolor="#3b63dd">
					<td colspan="6" align="center" class="fotter-color"><b>Manage
							Categories Of ArtDex</b></td>
				</tr>

				<tr bgcolor="#3b63dd">
					<td colspan="6" align="center" class="fotter-color"><b>&nbsp;</b></td>
				</tr>
				<tr bgcolor="#3b63dd">
					<th width="112" align="left" class="fotter-color">Sr. No</th>
					<th width="200" align="left" class="fotter-color">Category Name</th>
					<th width="236" align="left" class="fotter-color"></th>
					<th width="304" align="left" class="fotter-color"></th>
					<th colspan="2" align="center" class="fotter-color">Action</th>
				</tr>

				<?php foreach ($category as $temp => $admin){?>
				<tr>
					<td><?php echo $temp+1;?></td>
					<td><?php echo $admin['name'];?></td>
					<td><?php //echo ucfirst($admin['firstName']).' '.ucfirst($admin['lastName']);?>
					</td>
					<td>&nbsp;</td>
					<td width="45" align="center" bgcolor=""><a
						href="/editCategory/<?php echo $admin['cat_id'];?>"
						style="text-decoration: none;"> <img src="/public/images/edit.png"
							name="edit" border="0" value="Edit">
					</a>&nbsp;&nbsp;</td>
					<td width="49" align="center"><a href="javascript:void(0);"
						onClick="del(<?php echo $admin['cat_id'];?>)" Title="Delete Category"
						style="text-decoration: none;"> <img
							src="/public/images/delete.png" width="16" height="16" border="0">
					</a>
					</td>
				</tr>
				<?php }?>


			</table>

		</div>
		<div class="clr"></div>
		<script language="javascript">
function del(id)
{
	if(confirm("Do you want to Delete this Category"))
	{
		document.location="/deletecategory.php/"+id;
	} else{
		document.location="/managecategory.php";
	}
}
</script>
		<?php 
		// var_dump($category);
		?>

		<?php $this->load->view('admin/common/pageFooter');?>